import org.junit.Test;

public class Solution {
    @Test
    public  void TestCon(){
        transpose(new int[][]{
                {2,4,-1},{-10,5,11},{4,5,-7}
        });
    }

    public int[][] transpose(int[][] matrix) {
        //int res[][]=new int[matrix.length][matrix[0].length];


        for(int i=0;i<matrix.length;i++){
         int row=i+1;
         int col=i+1;
         while(row<matrix.length&&col<matrix.length){
             //if(row!=i&&col!=i){
                 int t1=matrix[row][col];
                 int t2=matrix[col][row];
                 matrix[row][col]=t2;
                 matrix[col][row]=t1;

            // }
             row++;
             col++;
             
         }   
        }
return matrix;
    }
}